<?php
require_once ('odal/meta/datatypeenumeration.php');
require_once ('odal/node.php');


/**
 * @version 1.0
 * @created 27-Dez-2003 21:35:22
 */
class odal_Datatype extends odal_Node
{
	var $m_datatypeEnumerations = Array();
	var $m_namespace;
	var $m_type;
	var $m_valuetype;

	function odal_Datatype( &$namespace, $id, $name, $type, $valuetype, $creatingDate = null, $creater = 0, $modifyingDate = null, $modifier = 0 ){
		$this->_createDatatype( $namespace, $id, $name, $type, $valuetype, $creatingDate, $creater, $modifyingDate, $modifier );
	}//odal_Datatype

	function _createDatatype( &$namespace, $id, $name, $type, $valuetype, $creatingDate, $creater, $modifyingDate, $modifier ){
		$this->m_namespace =& $namespace;
		$this->m_id = $id;
		$this->m_name = $name;
		$this->m_type = $type;
		$this->m_valuetype = $valuetype;
		$this->m_creatingDate = $creatingDate;
		$this->m_creater = $creater;
		$this->m_modifyingDate = $modifyingDate;
		$this->m_modifier = $modifier;
	}//_createDatatype

	function appendDatatypeEnumeration( &$datatypeEnumeration ){
		$this->m_datatypeEnumerations[$datatypeEnumeration->getId()] =&  $datatypeEnumeration;
	}//appendDatatypeEnumeration
	
	function &getDatatypeEnumerationById( $id ){
		return $this->getObjectFromCollectionById( $id, $this->m_datatypeEnumerations );
	}//getDatatypeById
	
	function &getDatatypeEnumerationByName( $name ){
		return $this->getObjectFromCollectionByName( $name, $this->m_datatypeEnumerations );
	}//getDatatypeByName

	function &getDatatypeEnumerations(){
		return $this->m_datatypeEnumerations;
	}//getDatatypeEnumerations
	
	function getNamespace(){
		return $this->m_namespace;
	}//getNamespace
	
	function getType(){
		return $this->m_type;
	}//getType

	function getValuetype(){
		return $this->m_valuetype;
	}//getValuetype
	
}//odal_Datatype
?>